package com.cloudfun.campusshare.repo;

import com.cloudfun.campusshare.entity.DeviceModeEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.Collection;
import java.util.List;

/**
 * Created by Huqin on 2020/4/20
 */
public interface DeviceModeRepo extends
        PagingAndSortingRepository<DeviceModeEntity, String>,
        JpaSpecificationExecutor<DeviceModeEntity> {

    List<DeviceModeEntity> findByMerchantId(String merchantId);

    List<DeviceModeEntity> findByMerchantIdAndModeSetId(String merchantId,String modeSetId);

    List<DeviceModeEntity> findByModeSetId(String merchantId);

    DeviceModeEntity findByModeSetIdAndMetaModeId(String modeSetId, String metaModeId);

    List<DeviceModeEntity> findByModeSetIdIn(Collection<String> modeSetIds);
}
